package com.yz.rabbitmq.exchange.direct;

import com.rabbitmq.client.Channel;
import com.yz.rabbitmq.ChannelsUtil;

import java.io.IOException;

/**
 * 描述：
 **/
public class DirectExchangePro {

    public static void main(String[] args) {
        Channel channel = ChannelsUtil.getChannel();
        try {
           channel.basicPublish("directExchange","direct",null,"hello world!".getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            ChannelsUtil.closeChannel(channel);
        }


    }
}
